<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

// Set the table directory
JTable::addIncludePath( JPATH_COMPONENT.DS.'tables' );

if (!JRequest::getWord('view'))
{
			JRequest::setVar('view', 'dashboard' );
			JRequest::setVar('layout', 'default' );
}

// Require the base controller
$path = JPATH_COMPONENT.DS.'controllers'.DS.JRequest::getVar('view').'.php';

require_once($path);

// Create the controller
$classname	= 'LettermanController'.ucfirst(JRequest::getWord('view'));
$controller = new $classname( );

$do = JRequest::getCmd('layout') ? JRequest::getCmd('layout') : JRequest::getCmd('task');

$controller->execute($do);

// Redirect if set by the controller
$controller->redirect();
?>
